<?php

session_start();
if (!empty($_SESSION['user'])) {
    if ( $_SESSION['perssime']==1){//管理员
        echo "<script>window.location='homeAdminOrders.php';</script>";
    }else {
        echo "<script>window.location='homeCustomer.php';</script>";

    }
}else{
    echo "<script>window.location='login.php';</script>";
}
?>